package it11.Capood.DataLogic;


import java.io.File;
import java.util.Date;

public class FileInfoMessage extends Message {
	
	private static final long serialVersionUID = 1L;
	private String name;
	private int size;
	private File file;
	private boolean accepted = false;
	
	
	public FileInfoMessage(String name, int size){
		super(new Date(),Message.Type.FILE_INFO);
		this.name = name;

		this.size = size;
		

	}
		
	public String getName() {
		return name;
	}
	

	
	public int getSize(){
		return size;
	}

	public File getFile() {
		return file;
	}

	public void setFile(File file) {
		this.file = file;
	}

	public boolean isAccepted() {
		return accepted;
	}

	public void setAccepted(boolean accepted) {
		this.accepted = accepted;
	}
	
	public String toString(){
		return super.toString() + "\n" + getName() + "\n" + (isAccepted()?" (accepted)":" (denied)");
	}
}